﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VonaJobs.BLL;
using VonaJobs.DAL.DAO;

namespace VonaJobs.UI.Employers
{
    public partial class CreateProfileFrm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public void CreateEmpProfile(object sender,EventArgs eventArgs)
        {
            try
            {
                Employer employer = new Employer();
                Location location=new Location();
                BusinessType businessType=new BusinessType();
                EmployerUser employerUser=new EmployerUser();
                EmployerManager employerManager = new EmployerManager();

                employer.CompanyName = txtCompanyName.Value;
                employer.Designation = txtContactdesignation.Value;
                employer.CompanyAddress = txtCompanyAddress.Value;
                employer.BillingAddress = txtBillingAddress.Value;
                employer.Area = txtArea.Value;
                employer.WebAddress = txtWebsite.Value;

                employer.CompanyLogo = txtUploadCompanyLogo.Value;//...............

                location.Country = selectCountry.Value;
                location.City = txtCity.Value;
                businessType.Id =Convert.ToInt32(selectBussinessType.Value);
                employerUser.Id = 1;//id will come from user table based on employeer code
               
               string msg=employerManager.CreateEmpProfile(employer);
                

            }
            catch (Exception)
            {
                
                throw;
            }
            
        }
    }
}